import request from '@/utils/request'
// 获取员工列表
export function getDishListAPI (params) {
  return request({
    url: '/dish/page',
    method: 'get',
    params
  })
}
// 删除接口
export function delDishAPI (ids) {
  return request({
    url: '/dish',
    method: 'delete',
    params: { ids }
  })
}
// 停售 启售 切换状态接口
export function setSaleStatusAPI (ids, status) {
  return request({
    url: `/dish/status/${status}`,
    method: 'post',
    params: { ids }
  })
}
// 获取菜品分类接口
export function getCategoryListAPI (type) {
  return request({
    url: '/category/list',
    method: 'get',
    params: { type: 1 }
  })
}
// 上传图片接口
export function uploadAPI (data) {
  return request({
    url: '/common/upload',
    method: 'post',
    data
  })
}
// 添加接口
export function addDishAPI (data) {
  return request({
    url: '/dish',
    method: 'post',
    data
  })
}
// 回显数据
export function getDishDetailAPI (id) {
  return request({
    url: `/dish/${id}`,
    method: 'get'
  })
}
// 编辑接口
export function editDishAPI (data) {
  return request({
    url: '/dish',
    method: 'put',
    data
  })
}
